<%@ Control Language="VB" AutoEventWireup="false" CodeFile="AddCodeMapping.ascx.vb" Inherits="WebForm_AddControl_AddCodeMapping" %>
<My:MyFormView ID="fv" runat="server" DefaultMode="Insert" DataKeyNames="TableName,ColumnName,Value">
    <HeaderTemplate>
        <table>
    </HeaderTemplate>
    <FooterTemplate>
        </table></FooterTemplate>
    <InsertItemTemplate>
        <table>       
            <tr>
                <td align="right">
                    <asp:Label ID="lblValue" runat="server" meta:resourcekey="lblValue"></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtValue" runat="server" Text='<%# Bind("Value") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator ID="vadValue" runat="server" Display="None" ControlToValidate="txtValue" ValidationGroup="CodeMappingSave"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="lblText" runat="server" meta:resourcekey="lblText"></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtText" runat="server" Text='<%# Bind("Text") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator ID="vadText" runat="server" Display="None" ControlToValidate="txtText" ValidationGroup="CodeMappingSave"></asp:RequiredFieldValidator>                    
                </td>
            </tr>            
            <tr>
                <td align="right">
                    <asp:Label ID="lblActive" runat="server" meta:resourcekey="lblActive"></asp:Label>
                </td>
                <td align="left">
                    <My:MyDropDownList ID="ddlActive" runat="server" DataSourceID="odsActive" AppendPleaseChooseItem="true" DataTextField="Text" DataValueField="Value" SelectedValue='<%# Bind("Active") %>' ></My:MyDropDownList>
                    <My:CodeMappingSqlDataSource ID="odsActive" runat="server" TableName="CodeMapping" ColumnName="Active"></My:CodeMappingSqlDataSource>
                    <asp:RequiredFieldValidator ID="vadActive" runat="server" Display="None" meta:resourcekey="vadActive" ControlToValidate="ddlActive" ValidationGroup="CodeMappingSave"></asp:RequiredFieldValidator>                    
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="lblSequence" runat="server" meta:resourcekey="lblSequence"></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtSequence" runat="server" Text='<%# Bind("Sequence") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator ID="vadSequence1" runat="server" Display="None" meta:resourcekey="vadSequence" ControlToValidate="txtSequence" ValidationGroup="CodeMappingSave"></asp:RequiredFieldValidator>                    
                    <asp:CompareValidator ID="vadSequence2" runat="server" Type="Integer" Operator="GreaterThanEqual" ValueToCompare="0" Display="None" meta:resourcekey="vadSequence" ControlToValidate="txtSequence" ValidationGroup="CodeMappingSave"></asp:CompareValidator>
                </td>
            </tr>                                     
            <tr>
                <td colspan="2">
                    <My:SaveToolBar ID="SaveToolBar1" runat="server" ValidationGroup="CodeMappingSave" />
                    <asp:ValidationSummary ID="Summary1" runat="server" ShowMessageBox="true" ShowSummary="false"
                        ValidationGroup="CodeMappingSave" />
                </td>
            </tr>
        </table>    
    </InsertItemTemplate>    
    <ItemTemplate>
        <table>       
            <tr>
                <td align="right">
                    <asp:Label ID="lblValue" runat="server" meta:resourcekey="lblValue"></asp:Label>
                </td>
                <td align="left">
                    <asp:Label ID="txtValue" runat="server" Text='<%# Bind("Value") %>'></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="lblText" runat="server" meta:resourcekey="lblText"></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtText" runat="server" Text='<%# Bind("Text") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator ID="vadText" runat="server" Display="None" ControlToValidate="txtText" ValidationGroup="CodeMappingSave"></asp:RequiredFieldValidator>                                        
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="lblActive" runat="server" meta:resourcekey="lblActive"></asp:Label>
                </td>
                <td align="left">
                    <My:MyDropDownList ID="ddlActive" runat="server" DataSourceID="odsActive" AppendPleaseChooseItem="true" DataTextField="Text" DataValueField="Value" SelectedValue='<%# Bind("Active") %>' ></My:MyDropDownList>
                    <My:CodeMappingSqlDataSource ID="odsActive" runat="server" TableName="CodeMapping" ColumnName="Active"></My:CodeMappingSqlDataSource>
                    <asp:RequiredFieldValidator ID="vadActive" runat="server" Display="None" meta:resourcekey="vadActive" ControlToValidate="ddlActive" ValidationGroup="CodeMappingSave"></asp:RequiredFieldValidator>                    
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="lblSequence" runat="server" meta:resourcekey="lblSequence"></asp:Label>
                </td>
                <td align="left">
                    <asp:TextBox ID="txtSequence" runat="server" Text='<%# Bind("Sequence") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator ID="vadSequence1" runat="server" Display="None" meta:resourcekey="vadSequence" ControlToValidate="txtSequence" ValidationGroup="CodeMappingSave"></asp:RequiredFieldValidator>                    
                    <asp:CompareValidator ID="vadSequence2" runat="server" Type="Integer" Operator="GreaterThanEqual" ValueToCompare="0" Display="None" meta:resourcekey="vadSequence" ControlToValidate="txtSequence" ValidationGroup="CodeMappingSave"></asp:CompareValidator>
                </td>
            </tr>                              
            <tr>
                <td colspan="2">
                    <My:SaveToolBar ID="SaveToolBar1" runat="server" ValidationGroup="CodeMappingSave" />
                    <asp:ValidationSummary ID="Summary1" runat="server" ShowMessageBox="true" ShowSummary="false"
                        ValidationGroup="CodeMappingSave" />
                </td>
            </tr>
        </table>
    </ItemTemplate>
</My:MyFormView>
